/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


jQuery(function ($){
    var elementoMenu = $("#menu");
    
    var posicaoMenu = elementoMenu.offset().top;
    
    $(window).scroll(function (){
        var posicaoAtualScroll = $(window).scrollTop();
        
        if(posicaoAtualScroll > posicaoMenu){
            elementoMenu.addClass('menufixo');
        }
        else{
            elementoMenu.removeClass('menufixo');
        }
    });
});